<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var Alist = [{co:20},{no: 30},{no2: 34}];
        var Blist = [];
        console.log(Alist[1])
        Object.keys(Alist[0])//返回一个数组 []，数组里面是属性的名字
       console.log( Object.keys(Alist[1]))
      
      
       Blist.push({value: Alist[0].co, name: Object.keys(Alist[0])[0]});
       Blist.push({value: Alist[1].no, name: Object.keys(Alist[1])[0]});
       Blist.push({value: Alist[2].no2, name: Object.keys(Alist[2])[0]});
    //    Blist.push({value: Alist[3].co, name: Object.keys(Alist[0])[0]});
    //    Blist.push({value: Alist[4].co, name: Object.keys(Alist[0])[0]});
       console.log(Blist)
      

       var string = {
        "String": "key为字符串",
        "other": "其他字符串"
    };
    console.log(Object.keys(string));
    </script>
</body>
</html>